<div data-ng-show="uuid">
  <div class="alert alert-info"
       data-ng-show="filter && metadataResources.length === 0"
       data-translate=""
       data-translate-values="{filter: filter}">
    fileStoreNoFileMatching
  </div>

  <table class="table gn-data-store">
    <tbody>
    <tr data-ng-repeat="r in metadataResources">
      <td>
        <a href=""
           title="{{'clickToAddResource' | translate}}"
           data-ng-click="setResource(r)">
          {{r.id.split('/').splice(2).join('/') | decodeURIComponent}}
        </a>
      </td>
      <td class="text-nowrap" data-ng-if="r.version.length > 0">
          {{r.version}}
      </td>
      <td data-ng-if="gnCurrentEdit.resourceManagementExternalProperties.enabled && r.metadataResourceExternalManagementProperties.url.length > 0">
      <a class="btn btn-link"
           title="{{'externalResourceManagement' | translate}}"
           data-ng-click="onlinesrcService.openExternalResourceManagement(r)">
          <i class="fa fa-file-text"></i>
        </a>
      </td>
      <td>
        <a class="btn btn-link"
           title="{{'openResource' | translate}}"
           target="_blank"
           data-ng-href="{{onlinesrcService.getApprovedUrl(r.url)}}">
          <i class="fa fa-eye"></i>
        </a>
      </td>
      <td>
        <a class="btn btn-link"
           title="{{'setResourceStatus' | translate}}"
           data-ng-click="setResourceStatus(r)">
          <i class="fa"
             data-ng-class="{'fa-lock text-danger': r.visibility == 'PRIVATE',
                               'fa-unlock text-success': r.visibility == 'PUBLIC'}"></i>
        </a>
      </td>
      <td>
        <a class="btn btn-link"
           title="{{'deleteResource' | translate}}"
           data-gn-confirm-click="{{'removeFileFromStoreConfirm' | translate:{url: r.url} }}"
           data-ng-click="deleteResource(r)">
          <i class="fa fa-trash text-danger"></i>
        </a>
      </td>
    </tr>
    </tbody>
  </table>

  <form class="form-horizontal"
        role="form"
        method="POST"
        enctype="multipart/form-data"
        data-file-upload="filestoreUploadOptions">

    <span class="btn btn-success btn-block fileinput-button"
          data-ng-class="{disabled: disabled}">
      <i class="fa fa-plus fa-white"></i>
      <span data-translate="">chooseOnlinesrc</span>
      <input type="file"
             multiple="multiple"
             name="file"
             data-ng-disabled="disabled"/>
    </span>

    <ul class="list-group">
      <li data-ng-repeat="file in queue"
          class="list-group-item">
        {{file.name}} ({{file.type}} / {{file.size | formatFileSize}})
        <i class="fa fa-times"
           data-ng-click="clear(file)"/>
      </li>
    </ul>

    <div class="col-lg-5 fade" data-ng-class="{in: active()}">
      <div class="progress progress-striped active"
           data-file-upload-progress="progress()"
           data-file-upload-done="loadMetadataResources()">
        <div class="progress-bar progress-bar-success"
             data-ng-style="{width: num + '%'}"/>
      </div>
      <div class="progress-extended">&nbsp;</div>
    </div>

  </form>
</div>
